package com.alit.face.koala.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import com.alit.face.koala.entity.UploadFileEntity;
import com.alit.face.koala.service.upload.UploadService;

@RestController
@RequestMapping("upload")
public class UploadController {
  @Autowired
  private UploadService us;

  @RequestMapping()
  public String uplaod(MultipartFile file) {
    UploadFileEntity upload = us.upload(file);
    return upload.getFullUri();
  }
}
